home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / nan_news / vol3 / no3 / cursize.c < prev    next >
Text File  |  1988-11-01  |  1KB  |  44 lines

  1. /* Program: CURSIZE.C                 */
  2. /* Author:  Gerry Braganza            */
  3. /* Note(s): Sets cursor size.         */
  4. /* Copyright (c) 1988 Nantucket Corp. */
  5.  
  6. #include "\fix\nandef.h"
  7. #include "\fix\extend.h"
  8. #include "\include\dos.h"
  9. #define CURSIZE 1     /* Set cursor size service.     */
  10. #define VIDEO 0x10    /* Video BIOS interrupt number. */
  11.  
  12. CLIPPER cursize()
  13.  
  14. {
  15.     union REGS regs;
  16.  
  17.     /* Starting and ending cursor position. */
  18.     int start;
  19.     int end;
  20.  
  21.     /* Check for number of parameters passed. */
  22.     if (_parinfo(0) != 2)
  23.        {
  24.        printf("Usage: cursize start(n) end(n)");
  25.        
  26.        }
  27.  
  28.     /* Check for parameters type. */
  29.     if (_parinfo(1) != 2 || _parinfo(2) != 2)
  30.        {
  31.        printf("data type mismatch");
  32.        
  33.        }
  34.     start = _parni(1);
  35.     end   = _parni(2);
  36.  
  37.     regs.h.ch = (char)start;     /* Starting line number. */
  38.     regs.h.cl = (char)end;       /* Ending line number.   */
  39.     regs.h.ah = CURSIZE;         /* Service number.       */
  40.  
  41.     int86(VIDEO, ®s, ®s);  /* Call video interrupt. */
  42.     
  43. }
  44.